package com.itheima;

import java.util.Scanner;
//通过Scanner 获取一个整数，然后使用while计算这个整数的阶乘
public class Ride {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int num = 1;
        while (N!=1){
            num = num * N;
            N--;
        }
        System.out.println(num);
    }
}
